package se

// IndexData 索引数据.
type IndexData struct {
	ID    uint32
	Count int
	Name  string
}

// Indexs 索引数据.
type Indexs []*IndexData

func (p Indexs) Len() int { return len(p) }
func (p Indexs) Less(i, j int) bool {
	if p[i].Count == p[j].Count {
		return p[i].ID < p[j].ID
	}

	return p[i].Count > p[j].Count
}
func (p Indexs) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
